<ion-navbar *navbar primary>
    <ion-buttons start>
        <button [navPush]="search">
            <ion-icon name="search"></ion-icon>
        </button>
    </ion-buttons>
    <ion-title>主页</ion-title>
    <ion-buttons end>
        <button (click)="showOptions()">
            <ion-icon name="more"></ion-icon>
        </button>
    </ion-buttons>
</ion-navbar>

<ion-content class="home">
    <ion-refresher (refresh)="doRefresh($event)">
        <ion-refresher-content>
        </ion-refresher-content>
    </ion-refresher>
    <ion-list no-padding>
        <ion-list-header>我的关注</ion-list-header>
        <!--<ion-item *ngFor="#star of stars" *ngIf="setting.showOnlyOnline && !star.is_live" (click)="showAction(star)">-->
        <ion-item *ngFor="#star of stars" (click)="showAction(star)">
            <ion-avatar item-left>
                <img [src]="star.avatar">
            </ion-avatar>
            <img [src]="star.cover">
            <h2>
                <ion-badge secondary *ngIf="star.is_live">在线</ion-badge>
                <ion-badge danger *ngIf="!star.is_live">休息</ion-badge>
                {{star.nickname}}
            </h2>
            <p>{{star.title}}</p>
            <p *ngIf="star.is_live">Start at {{star.began_at | amTimeAgo}}</p>
            <p *ngIf="!star.is_live">Last broadcast {{star.end_at | amTimeAgo}}</p>
        </ion-item>
    </ion-list>
    <ion-fixed hideWhen="ios">
        <button fab fab-right fab-bottom [navPush]="search">
            <ion-icon name="add"></ion-icon>
        </button>
    </ion-fixed>
    <ion-fixed id="add_star_btn" showWhen="ios">
        <button fab fab-right fab-bottom [navPush]="search">
            <ion-icon name="add"></ion-icon>
        </button>
    </ion-fixed>
</ion-content>